package com.gun.management.module.task.enums;

public enum ContentTypeEnum {

    SHARETOTEXT(1, "01", "分享微信好友纯文本"),
    SHARETOPICTURE(2, "02", "分享微信好友图片"),
    SHARETOURL(3, "03", "分享微信好友链接"),
    SHARETOGROUPTEXT(4, "11", "分享朋友圈纯文本"),
    SHARETOGROUPPICTURE(5, "12", "分享朋友圈图片"),
    SHARETOGROUPURL(6, "13", "分享朋友圈链接");


    private final int id;

    private final String value;
    private final String name;


    ContentTypeEnum(int id, String value, String name) {
        this.id = id;
        this.value = value;
        this.name = name;
    }

    // 根据id查找对应的ContentTypeEnum枚举常量
    public static ContentTypeEnum findByLabel(String label) {
        for (ContentTypeEnum item : ContentTypeEnum.values()) {
            if (item.getName().equals(label)) {
                return item;
            }
        }
        return null; // 如果未找到，返回null
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getValue() {
        return value;
    }

}
